//
//  RDHttpRequest.h
//  RDelivery
//
//  Created by selmerzhang on 2021/8/26.
//  Copyright © 2021 Tencent. All rights reserved.
//

#ifndef RDHttpRequest_h
#define RDHttpRequest_h

#import <RaftInterface/RAFTNetworkProtocol.h>
#import "RDConfigServerJsonModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface RDHttpRequest : NSObject <RAFTHttpRequestProtocol>
/// 请求地址
@property(nonatomic, copy) NSString *requestUrl;

/// method 方法，GET、HEAD、POST、OPTIONS、PUT、DELETE、TRACE、CONNECT
@property(nonatomic, copy) RAFTNetworkHttpMethod requestMethod;

/// 请求的超时时间
@property(nonatomic, assign) NSTimeInterval timeout;

/// 请求的缓存策略
@property(nonatomic, assign) NSURLRequestCachePolicy requestCachePolicy;

/// 请求参数
@property(nonatomic, copy, nullable) NSDictionary *parameters;

/// 签名（也作为批量请求回包的 Key）
@property (nonatomic, copy) NSString *sign;

/// 上报信息
@property(nonatomic, copy, nullable) NSDictionary<NSString *, NSString *> *reportParams;

/// 请求的body体(加密数据)
@property(nonatomic, strong, nullable) NSData *httpBody;

/// 请求的header值
@property(nonatomic, copy, nullable) NSDictionary<NSString *, NSString *> *headerFields;

/// 请求完成的回调
@property(nonatomic, copy, nullable) RAFTRequestCompletedBlock completedBlock;

//合并请求的发起时间戳
@property (nonatomic, assign) NSTimeInterval batchRequestStartTime;

@end


NS_ASSUME_NONNULL_END

#endif /* RDHttpRequest_h */

